/**
 * Created by Dark on 2015/8/11.
 */


//当currentProfit是正值的时候，元素会绑定profitPositive class，否则绑定profitWarning class
//$(function(){
//    var viewModel = {
//        currentProfit: ko.observable(150000)
//    };
//
//    // Evalutes to a positive value, so initially we apply the "profitPositive" class
//    viewModel.profitStatus = ko.pureComputed(function() {
//        return this.currentProfit() < 0 ? "profitWarning" : "profitPositive";
//    }, viewModel);
//
//    // Causes the "profitPositive" class to be removed and "profitWarning" class to be added
//    viewModel.currentProfit(-50);
//    ko.applyBindings(viewModel);
//
//});